#ifndef __BSP_USART__H
#define __BSP_USART__H

#include "usart.h"
/************** Length of the DBUS origin data **************/
#define SBUS_RX_BUF_NUM 			36u
#define RC_FRAME_LENGTH 			18u
#define DEBUG_BUF_LEN					1u
#define NUC_REC_LEN					  16u
/*********************************** Private defines *****************************************/
#define NUC_USART                   USART6
#define NUC_USART_HANDLE            huart6
#define REMOTE_RX_USART             USART3
#define REMOTE_RX_USART_HANDLE		  huart3
#define DEBUG_USART                 USART1
#define DEBUG_USART_HANDLE          huart1
#define NUC_DMA_USART               hdma_usart6_rx
#define REMOTE_DMA_USART            hdma_usart3_rx
#define DEBUG_DMA_USART							hdma_usart1_rx
void MY_UART_INIT(void);
void UART_RX_IDLE_IRQ(UART_HandleTypeDef *huart);
void Usart1Init(void);
void RemoteControlInit(void);
void RemoteControlParamInit(void);
void USART3_IDLE_IRQ(void);

void USART_DMA_Enable(  UART_HandleTypeDef *huart, \
                        DMA_HandleTypeDef *hdma, \
                        uint8_t * buffer_addr, \
                        uint8_t data_size );
void usart1_tx_dma_enable(uint8_t *data, uint16_t len);
void usart1_tx_dma_init(void);
#endif
